home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 24 / MacFormat n. 24 (Spain) / MacFormat 24.bin / Demos / Jungle Activated! / JungleActivated Demo / jung DEMO d / 00064_Initialisation.ls < prev    next >
Encoding:
Text File  |  1996-10-14  |  2.4 KB  |  92 lines

  1. on startMovie
  2.   set the volume of sound 2 to 255
  3.   sound playFile 2, getpn() & "Sounds:bckgrd5.aif"
  4.   cursor(4)
  5.   memoryInitialise()
  6.   InitialiseGlobals()
  7.   SpriteStates()
  8.   repeat with i = 255 down to 0
  9.     set the volume of sound 2 to i
  10.     startTimer()
  11.     repeat while the timer < 1
  12.       nothing()
  13.     end repeat
  14.   end repeat
  15.   sound stop 2
  16.   OpenFillScreen()
  17. end
  18.  
  19. on InitialiseGlobals
  20.   global gBackgroundSound, gBackgroundVolume, gWhereFrom, gWhichSound1, gWhichSound2, gWhichSound3, gWhichSound4, gWhichSound5, gWhichSound6, gWhichSound7, gWhichSound8, gWhichSound9, gWhichSound10, gLoopScale, gBassScale, gKeyboardScale, gOutputScale, gFragment1, gFragment2, gFragment3, gFragment4, gBassKill, gSliderPos1, gSliderPos2, gSliderPos3, gSliderPos4, gDoneVid
  21.   set gBackgroundSound to 1
  22.   set gBackgroundVolume to 255
  23.   if voidp(gWhereFrom) then
  24.     set gWhereFrom to EMPTY
  25.   end if
  26.   set gArtistFrom to EMPTY
  27.   set gWhichSound1 to EMPTY
  28.   set gWhichSound2 to EMPTY
  29.   set gWhichSound3 to EMPTY
  30.   set gWhichSound4 to EMPTY
  31.   set gWhichSound5 to EMPTY
  32.   set gWhichSound6 to EMPTY
  33.   set gWhichSound7 to EMPTY
  34.   set gWhichSound8 to EMPTY
  35.   set gWhichSound9 to EMPTY
  36.   set gWhichSound10 to EMPTY
  37.   set gLoopScale to 256
  38.   set gBassScale to 256
  39.   set gKeyboardScale to 256
  40.   set gOutputScale to 100
  41.   set gSliderPos1 to 1
  42.   set gSliderPos2 to 2
  43.   set gSliderPos3 to 3
  44.   set gSliderPos4 to 4
  45.   set gFragment1 to 0
  46.   set gFragment2 to 0
  47.   set gFragment3 to 0
  48.   set gFragment4 to 0
  49.   set gBassKill to 0
  50.   set gDoneVid to 0
  51. end
  52.  
  53. on SpriteStates
  54.   repeat with i = 29 to 35
  55.     set the visible of sprite i to 0
  56.   end repeat
  57.   set the visible of sprite 48 to 0
  58.   set the volume of sound 1 to 255
  59.   set the volume of sound 2 to 255
  60.   set the foreColor of sprite 42 to 255
  61.   set the foreColor of sprite 43 to 255
  62.   set the foreColor of sprite 44 to 255
  63.   set the foreColor of sprite 45 to 255
  64.   set the foreColor of sprite 46 to 255
  65.   set the foreColor of sprite 47 to 255
  66. end
  67.  
  68. on MemoryRoutine
  69.   global gMemorySize
  70.   if the memorysize < 12000000 then
  71.     set gMemorySize to 8
  72.     SmallPreload()
  73.   end if
  74.   if the memorysize >= 12000000 then
  75.     set gMemorySize to 16
  76.     BigPreload()
  77.   end if
  78. end
  79.  
  80. on stopMovie
  81.   global gColourDepth
  82.   set the colorDepth to gColourDepth
  83.   forget(window "Stdsound.dir")
  84.   forget(window "Artists.dir")
  85.   forget(window "Titles.dir")
  86.   forget(window "Quiz.dir")
  87.   repeat with i = 1 to 13
  88.     sound stop i
  89.   end repeat
  90.   closeFillScreen()
  91. end
  92.